Repository navigation
feat(c): export a pinned table's Arrow schema - #1331
Merged
JingsongLi merged 1 commit intoNov 5, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: Closes #1328.
Native callers need to construct Arrow batches matching the pinned table.
Exporting its write schema avoids duplicating the Paimon-to-Arrow mapping or
querying a catalog again.
Prepared with AI assistance.
Brief change log
Add
paimon_table_export_arrow_schemain the table bindings, reusingbuild_target_arrow_schema. Write an independently owned Arrow C DataInterface schema into empty caller-provided storage. Reject null handles,
null outputs and outputs with a live release callback without replacing them.
Tests
Validated with the existing Rust 1.97.0 toolchain on macOS arm64:
cargo +1.97.0 test --locked -p paimon-c --lib: 95 passed.export without catalog/schema files; free the table before inspecting output;
reject live output reuse; release and reuse storage; check null pointers.
exported schema.
cargo +1.97.0 fmt --all -- --checkandgit diff --check: passed.cargo +1.97.0 clippy --locked -p paimon-c --all-targets -- -D warnings: passed.Not run locally: CI-pinned Rust 1.98.0 checks, the full workspace/Vortex
suite, or the Linux/MSRV matrix. The results above cover the listed commands.
API and Format
One additive C function; no core type-mapping or storage format change. The
caller supplies initialized empty ArrowSchema storage and releases the result
through its callback. The output can outlive the borrowed table handle.
Documentation
Add schema export, batch-construction guidance and release ownership to the C
integration guide. The core mapping remains authoritative, including
unsupported types.